home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1773 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.6 KB

  1. Path: rz.uni-passau.de!sidonius!berndl
  2. From: berndl@sidonius.uni-passau.de (Klaus Berndl)
  3. Newsgroups: comp.lang.c
  4. Subject: Handling of multiple identical servers by the portmapper
  5. Date: 16 Jan 1996 18:51:06 GMT
  6. Organization: University of Passau, Germany
  7. Sender: berndl@sidonius (Klaus Berndl)
  8. Distribution: world
  9. Message-ID: <4dgs2q$ldf@news.rz.uni-passau.de>
  10. NNTP-Posting-Host: 132.231.1.76
  11. Keywords: RPC, portmapper
  12.  
  13.  
  14. The following turns around RPC, Portmapper and stuff like that. It isn`t a direct C-problem but RPC-calls relates to C so that i post my problem also in this newsgroup.
  15.  
  16. Assume a client-process writing some data via RPC-call into a server-process and later reading this previously written data (via another RPC-call) multiple times with arbitrary time-intervals between.
  17.  
  18. Assume further there a multiple clients each of them wants to write data into the server and later to read from the server. Each client starts for these purpose a new server-process.
  19.  
  20. It seems the portmapp-deamon (respectively the rpcbind on solaris 2.x) handles this situation correct if the following chronological order related to the startpoints of the processes is kept:
  21.  
  22. server(1)
  23. client(1)
  24. server(2)
  25. client(2)
  26. server(3)
  27. client(3) (the number within brackets indicates a pair of corresponing                       client-server)
  28.  
  29. In the next situation the client(2) overwrites datas previously written by client(1):
  30.  
  31. server(1)
  32. server(2)
  33. client(1)
  34. client(2)
  35.  
  36. My conjecture is that the portmap-deamon assigns a requesting (via 'clnt_create'-call) client-process the portnumber of that matching (related to the program-number) serverprocess which has last of all (related to servers with matching program-numbers) registered itself to the portmapper. (The program-number is declared in the 'application.x '-file).
  37.  
  38. If this supposition is correct it would explain the wrong result in the latter situation described above: both clients are assigned to the portnumber of server(2) by the portmapper. Therefore client(2) overwrites the datas of client(1) and later client(1) reads not his own datas but these of client(2)!
  39.  
  40. My question is very short: Is my conjecture correct? Is that specific topic somewhere (manual, book, www...) described?
  41.  
  42. Thanks for your patience with reading such a long problem-description and a lot of thanks in advance for a helpful answer!
  43.  
  44. Ciao,
  45.        KLaus  
  46.  
  47.  
  48. _______________________________________________________________________________
  49.  
  50. Klaus Berndl                                   e-mail: berndl@fmi.uni-passau.de
  51. _______________________________________________________________________________
  52.